package com.VerificationCode.demo;

import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("/log")
@RestController
public class LoggerController {
   /* private static Logger logger =LoggerFactory.getLogger(LoggerController.class);
*/
    @PostConstruct
    public void print(){
        System.out.println("================");
        System.out.println("打印日志");
        log.info("打印日志");
        log.trace("================= trace ===============");
        log.debug("================= debug ===============");
        log.info("================= info ===============");
        log.warn("================= warn ===============");
        log.error("================= error ===============");

    }

}
